package com.feng.aclservice.service;

import com.feng.aclservice.entity.Permission;
import com.baomidou.mybatisplus.extension.service.IService;
import com.feng.commonutils.R;

import java.util.List;

/**
 * <p>
 * 权限 服务类
 * </p>
 *
 * @author fengge
 * @since 2023-04-02
 */
public interface AclPermissionService extends IService<Permission> {
    /**
     * 递归查询所有菜单
     * @return
     */
    R queryAllMenuGuli();

    /**
     * 递归删除所有菜单
     * @param id
     * @return
     */
    R removeChildrenByid(String id);

    /**
     * 给角色菜单分配id
     * @param roleId
     * @param permissionId
     * @return
     */
    R saveRolePermissionRealtionShipGuli(String roleId, String[] permissionId);

    /**
     * 根据角色获取菜单
     * @param roleId
     * @return
     */
    List<Permission> selectAllMenu(String roleId);
}
